#include <iostream>
using namespace std;

int avg(int a[],int n)
{
    int sum=0;
    for(int i=0;i<n;i++)
    {
        sum+=a[i];
    }
    return sum/n;
}

double avg(double a[],int n)
{
    double sum=0;
    for(int i=0;i<n;i++)
    {
        sum+=a[i];
    }
    return sum/n;
}

long avg(long a[],int n)
{
    long sum=0;
    for(int i=0;i<n;i++)
    {
        sum+=a[i];
    }
    return sum/n;
}


//

int main(){

    int a[5]={2,39,-6,11,-100};
    int b[4]={5,6,1,28};
    double c[7]={72,-6.1,97,68.2,-51.3,-8,1234};
    long d[3]={658L,1489L,-256L};
    cout<<avg(a,5)<<endl;
    cout<<avg(b,4)<<endl;
    cout<<avg(c,7)<<endl;
    cout<<avg(d,3)<<endl;
    return 0;

}